<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QSculpt: engine/include/GlslShader.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QSculpt
   &#160;<span id="projectnumber">0.0.1a</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">engine/include/GlslShader.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">//  GlslShader.h</span>
<a name="l00003"></a>00003 <span class="comment">//  qsculpt</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">//  Created by Juan Cabral on 1/15/12.</span>
<a name="l00006"></a>00006 <span class="comment">//  Copyright (c) 2012 plastilinaware. All rights reserved.</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef qsculpt_GlslShader_h</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define qsculpt_GlslShader_h</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;sstream&gt;</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="keyword">template</span> &lt;GLenum SHADERTYPE&gt;
<a name="l00017"></a><a class="code" href="class_glsl_shader.html">00017</a> <span class="keyword">class </span><a class="code" href="class_glsl_shader.html">GlslShader</a>
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019 <span class="keyword">public</span>:
<a name="l00020"></a>00020     <a class="code" href="class_glsl_shader.html">GlslShader</a>();
<a name="l00021"></a>00021     ~<a class="code" href="class_glsl_shader.html">GlslShader</a>();
<a name="l00022"></a>00022     
<a name="l00026"></a>00026     GLenum <a class="code" href="class_glsl_shader.html#a895e9423a5f5a913bdec9335ac517afc">shaderType</a>() <span class="keyword">const</span>;
<a name="l00027"></a>00027     
<a name="l00031"></a>00031     GLuint <a class="code" href="class_glsl_shader.html#a6e39dfae18ac890840524faced4af698">shaderId</a>() <span class="keyword">const</span>;
<a name="l00032"></a>00032     
<a name="l00036"></a>00036     <span class="keywordtype">bool</span> <a class="code" href="class_glsl_shader.html#a80ddc4be23be69912651db0385a1a4b9">loadFromFile</a>(<span class="keyword">const</span> std::string &amp; filename);
<a name="l00037"></a>00037     
<a name="l00041"></a>00041     <span class="keywordtype">bool</span> <a class="code" href="class_glsl_shader.html#a495f058db0d95e8987ebca491c535215">loadFromString</a>(<span class="keyword">const</span> std::vector&lt;std::string&gt; &amp; <a class="code" href="class_glsl_shader.html#a81815dbf544cca88a36dbf24b7c3cecd">source</a>);
<a name="l00042"></a>00042     
<a name="l00053"></a>00053     <span class="keywordtype">bool</span> <a class="code" href="class_glsl_shader.html#acc20e4b03621cb1631e901a51aec6922">compile</a>();
<a name="l00054"></a>00054     
<a name="l00061"></a>00061     <span class="keywordtype">bool</span> <a class="code" href="class_glsl_shader.html#aba3f29ce22e41fb5be6a6c89c214da1f">compileStatus</a>() <span class="keyword">const</span>;
<a name="l00062"></a>00062     
<a name="l00068"></a>00068     std::string <a class="code" href="class_glsl_shader.html#ab0c2e76279c634e75e75b24a85a2ef18">infoLog</a>();
<a name="l00069"></a>00069     
<a name="l00074"></a>00074     std::string <a class="code" href="class_glsl_shader.html#a81815dbf544cca88a36dbf24b7c3cecd">source</a>() <span class="keyword">const</span>;
<a name="l00075"></a>00075     
<a name="l00076"></a>00076 <span class="keyword">protected</span>:
<a name="l00077"></a>00077     GLuint                      shaderId_;
<a name="l00078"></a>00078 };
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="keyword">typedef</span> <a class="code" href="class_glsl_shader.html">GlslShader&lt;GL_VERTEX_SHADER&gt;</a> <a class="code" href="class_glsl_shader.html">VertexShader</a>;
<a name="l00082"></a>00082 <span class="keyword">typedef</span> <a class="code" href="class_glsl_shader.html">GlslShader&lt;GL_FRAGMENT_SHADER&gt;</a> <a class="code" href="class_glsl_shader.html">FragmentShader</a>;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu May 31 2012 16:19:51 for QSculpt by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
